﻿namespace Cap
{
    public class CloudEventContext
    {
        public ICloudEvent Event { get; }

        public IServiceProvider Services { get; }

        public byte[] Body => Event.Content;

        public string Subject => Event.Subject;

        internal CloudEventContext(
            ICloudEvent @event,
            IServiceProvider services)
        {
            Event = @event;
            Services = services;
        }
    }
}
